package com.hntest.entity;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class BidRequest {

    private static final long serialVersionUID = -9148437073259797244L;
    private int bidRequestId;//ID
    private int version;//版本
    private int returnType=BidConst.RETURN_TYPE_MONTH_INTEREST_PRINCIPAL;//还款方式
    private int bidRequestType=BidConst.BIDREQUEST_TYPE_NORMAL;//标的类型
    private int bidRequestState=BidConst.BIDREQUEST_STATE_PUBLISH_PENDING;//这个标的状态
    private BigDecimal bidRequestAmount=BidConst.ZERO;//借款金额
    private BigDecimal currentRate=BidConst.ZERO;//借款利率
    private BigDecimal minBidAmount=BidConst.SMALLEST_BID_AMOUNT;// 最小投标
    private int monthes2Return= 1;//借款期限(月份数1-12)0
    private int bidCount= 0;//已有投标数量
    private BigDecimal totalRewardAmount=BidConst.ZERO;//总利息
    private BigDecimal currentSum=BidConst.ZERO;//当前已经借到多少钱
    private String title="";//借款标题
    private String description="";// 借款描述
    private String note= ""; //风控评审意见
    private Date disableDate = new Date(); //招标到期时间(页面数据是招标天数，无效日期=招标天数+当前日期)
    private int disableDays =0;//标的有效天数
    private LoginInfo createUser;//借款人
    private List<Bid> bids=new ArrayList<>();//这个借款已经有的标
    private Date applyTime; //申请时间
    private Date publishTime;   //发布时间

    public String getState(){
        switch (bidRequestState){
            case BidConst.BIDREQUEST_STATE_BIDDING:
                return "发标审核通过";
            case BidConst.BIDREQUEST_STATE_PUBLISH_REFUSE:
                return "发标审核拒绝";
            case BidConst.BIDREQUEST_STATE_APPROVE_PENDING_1:
                return "满标一审通过";
            case BidConst.BIDREQUEST_STATE_APPROVE_PENDING_2:
                return "满标二审通过";
            case BidConst.BIDREQUEST_STATE_REJECTED:
                return "满标审核拒绝";
            default:
                return "错误状态";
        }
    }

    public int getBidRequestId() {
        return bidRequestId;
    }

    public void setBidRequestId(int bidRequestId) {
        this.bidRequestId = bidRequestId;
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    public int getReturnType() {
        return returnType;
    }

    public void setReturnType(int returnType) {
        this.returnType = returnType;
    }

    public int getBidRequestType() {
        return bidRequestType;
    }

    public void setBidRequestType(int bidRequestType) {
        this.bidRequestType = bidRequestType;
    }

    public int getBidRequestState() {
        return bidRequestState;
    }

    public void setBidRequestState(int bidRequestState) {
        this.bidRequestState = bidRequestState;
    }

    public BigDecimal getBidRequestAmount() {
        return bidRequestAmount;
    }

    public void setBidRequestAmount(BigDecimal bidRequestAmount) {
        this.bidRequestAmount = bidRequestAmount;
    }

    public BigDecimal getCurrentRate() {
        return currentRate;
    }

    public void setCurrentRate(BigDecimal currentRate) {
        this.currentRate = currentRate;
    }

    public BigDecimal getMinBidAmount() {
        return minBidAmount;
    }

    public void setMinBidAmount(BigDecimal minBidAmount) {
        this.minBidAmount = minBidAmount;
    }

    public int getMonthes2Return() {
        return monthes2Return;
    }

    public void setMonthes2Return(int monthes2Return) {
        this.monthes2Return = monthes2Return;
    }

    public int getBidCount() {
        return bidCount;
    }

    public void setBidCount(int bidCount) {
        this.bidCount = bidCount;
    }

    public BigDecimal getTotalRewardAmount() {
        return totalRewardAmount;
    }

    public void setTotalRewardAmount(BigDecimal totalRewardAmount) {
        this.totalRewardAmount = totalRewardAmount;
    }

    public BigDecimal getCurrentSum() {
        return currentSum;
    }

    public void setCurrentSum(BigDecimal currentSum) {
        this.currentSum = currentSum;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public Date getDisableDate() {
        return disableDate;
    }

    public void setDisableDate(Date disableDate) {
        this.disableDate = disableDate;
    }

    public int getDisableDays() {
        return disableDays;
    }

    public void setDisableDays(int disableDays) {
        this.disableDays = disableDays;
    }

    public LoginInfo getCreateUser() {
        return createUser;
    }

    public void setCreateUser(LoginInfo createUser) {
        this.createUser = createUser;
    }

    public List<Bid> getBids() {
        return bids;
    }

    public void setBids(List<Bid> bids) {
        this.bids = bids;
    }

    public Date getApplyTime() {
        return applyTime;
    }

    public void setApplyTime(Date applyTime) {
        this.applyTime = applyTime;
    }

    public Date getPublishTime() {
        return publishTime;
    }

    public void setPublishTime(Date publishTime) {
        this.publishTime = publishTime;
    }
}
